<template>
  <div class="content_style">
    <div class="handle_title">
      <div class="title_user">
        <img
          style="width: 40px;"
          :src="userInfor.headUrl"
        >
        <div style="margin-left: 10px;">
          <div>{{ userInfor.name }}</div>
          <div style="
          font-weight: 400;
          font-size: 10px;
          color: #B3B3B3;">
            工号：{{ userInfor.jobNumber }}
          </div>
        </div>
      </div>
      <div>
        <i
          @click="changeShow"
          style="font-size: 20px; cursor: pointer;"
          class="el-icon-s-fold hover"
        ></i>
      </div>
    </div>
    <div style="padding: 0 10px;">
      <but @change="newWindow" type="primary" icon="el-icon-plus">对话框
        <!-- <template slot='foot'>
          <span class="key_style">Ctrl</span>
          <span class="key_style">K</span>
        </template> -->
      </but>
    </div>
  </div>
</template>

<script>

import but from './but.vue';
export default {
  components: { but },
  name:'AiHandleHead',
  props: {
    userInfor: {
      type: Object,
      default: () => ({})
    }
  },
  methods: {
    changeShow() {
      this.$store.dispatch("aiChat/setStatus", false);
    },
    newWindow() {
      this.$emit('change', {
        type: 'CHAT',
        contextId: ''
      })
    }
  },
};
</script>

<style lang="scss" scoped>
.content_style {
  // margin: 0 10px;
  // padding: 0 10px;
  .handle_title {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6.5px 10px;
    margin-bottom: 10px;
    .title_user {
      font-size: 18px;
      font-weight: bold;
      display: flex;
      align-self: center;
    }
  }
}
.key_style {
  font-size: 10px;
  padding: 0px 2px;
  margin: 0 2px;
  border: 1px solid #a3a9f7;
}
</style>
